More results...

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
post
page
Python IDE Dashboard

SQL Query Builder

Put your SQL skills to the test with this interactive SQL Query Builder! In this challenge, you will practise constructing SQL statements by selecting the correct clauses to retrieve or manipulate data stored in database tables. Work your way through a range of SELECT, UPDATE, DELETE and INSERT queries, choosing the correct SQL syntax from a set of possible options. As you build each query, you will receive instant feedback to help you spot and correct mistakes, making this a fun and effective way to revise SQL for GCSE and A Level Computer Science and beyond.

SQL Query BuilderOpen Quiz in a New Window

GCSE Computer Science Definition Builder

Learning the key terminology is an essential part of success in GCSE Computer Science. This interactive Definition Builder challenge helps students revise important keywords by asking them to reconstruct definitions one phrase at a time. Simply drag each definition card into the correct order and receive instant feedback on your answers. Choose to focus on a specific topic, such as Computer Hardware, Networks or Programming Concepts, or test yourself with the Mix All Categories option for the ultimate revision challenge. Whether you’re preparing for an assessment or revising for your GCSE exams, this activity is a fun and engaging way to strengthen your understanding of Computer Science vocabulary.

GCSE Computer Science – Definition BuilderOpen Quiz in a New Window

Storage Capacity Contest

Have you ever wondered whether 2,000 KB is larger than 1 MB, or how 3,000,000 Bytes compares to 5 MB? Understanding computer storage units is an important skill for every computing student, but comparing different units can sometimes be trickier than it looks!

Compete the following quiz to put your understanding of computer storage capacities to the test!

Storage Capacity ContestOpen Crossword Puzzle in a New Window

The Lost Ice Ship

In 1915, the famous explorer Sir Ernest Shackleton set out on an Antarctic expedition aboard his ship, Endurance. Unfortunately, the ship became trapped in the ice of the Weddell Sea and was eventually crushed and sunk. For more than 100 years, the exact location of the wreck remained a mystery.

In 2022, a team of explorers and scientists launched a new expedition to the Weddell Sea with one important goal: to find the lost shipwreck of Endurance.

The Weddell Sea is one of the most challenging places on Earth. It is covered with drifting sea ice and scattered with enormous icebergs. To search for the wreck, the expedition’s captain had to carefully plan a new navigation route every day. The ship could only scan a small section of the seabed at a time, so each route had to be designed to cover as much area as possible while safely avoiding dangerous ice.

The captain used precise navigation instructions to guide the ship through the icy waters. Every turn, movement, and change of direction had to be carefully planned and followed.

Now it’s your turn to help!

In the following 32 coding challenges, you will follow a series of navigation routes, just like the captain and crew did during their search. By using programming instructions to guide the expedition through the Weddell Sea, you will explore different areas and gradually narrow down the possible location of the famous shipwreck.

Can you successfully follow all 32 navigation routes and help locate the lost Endurance?

Click on the picture below to access this activity:

Using a Autonomous Underwater Vehicle/Submarine (AUV)

To scan the seabed more than 3,000m below sea level each across a small delimited area of the Weddell Sea, the scientists and crew on board the expedition ship used a remote controlled submarine called an AUV: Autonomous Underwater Vehicle. You can find out more about the AUV used on this expedition by completing this extra Python challenge: Endurance Shipwreck Search Expedition

Boolean Algebra Simplification Quiz

Put your Boolean Algebra skills to the test!

The Boolean Algebra Simplification QuizOpen in New Window

The Boolean Game

Play the Boolean Game to put your Boolean logic to the test!

The Boolean GameOpen in New Window

Interactive Sorting Algorithms

Use the following two interactive sorting algorithm activities to test your understanding of the Bubble sort and the Insertion sort algorithms.
Bubble Sort Interactive ActivityOpen in New Window Insertion Sort Interactive ActivityOpen in New Window

Bubble SortInsertion Sort

Online HTML, CSS & JavaScript Editor

Try our new online editor to code using HTML, CSS and JavaScript.

Not sure what to code? Try one of our HTML/CSS or JavaScript challenges.

Check our CSS Tools Hub to help you in any of your HTML / CSS web projects.

You can open the online web editor in a new window by using this button:

Estimating π with François Viète’s Infinite Product

Long before computers existed, mathematicians were already trying to pin down the value of π using clever geometric constructions and infinite processes. One of the earliest breakthroughs came from a French mathematician named François Viète (1540–1603), who discovered one of the first known infinite product formulas in mathematics.

Viète’s work is especially remarkable because it predates calculus. Instead of using series or integrals, he built Ï€ using an infinite sequence of nested square roots derived from geometry.

The Viète Formula for π

Viète discovered that π can be expressed as an infinite product:
\frac{2}{\pi} = \frac{\sqrt{2}}{2} \cdot \frac{\sqrt{2 + \sqrt{2}}}{2} \cdot \frac{\sqrt{2 + \sqrt{2 + \sqrt{2}}}}{2} \cdot \cdots

Rearranging this formula gives:
\pi = \frac{2}{\displaystyle \prod_{n=1}^{\infty} \frac{a_n}{2}}

Where each term is built recursively:

  • a_1 = \sqrt{2}
  • a_2 = \sqrt{2+\sqrt{2}}
  • a_3 = \sqrt{2+\sqrt{2+\sqrt{2}}}

And so on…

  • a_n = \sqrt{2+\sqrt{2+\sqrt{2+\cdots}}} = \sqrt{2+ a_{n-1}} with n>1.

As the number of terms (n) increases, the product converges slowly but steadily towards Ï€. François Viète’s infinite product for estimating Ï€ can be visualised by drawing regular polygons inside a circle, where increasing the number of sides makes the polygon more closely approximate the circle and leads to a more accurate estimate of Ï€.
​

Python Challenge

Your task is to write a Python program that estimates the value of π using Viète’s infinite product. However instead of computing infinite terms, you will approximate the value of π using a fixed number of iterations.

unlock-access

Solution...

The solution for this challenge is available to full members!
Find out how to become a member:
➤ Members' Area

Recycling Bin Helper Program

Recycling correctly helps reduce waste and protects the environment. Different types of waste need to be placed in different bins, but remembering which item goes in which bin can sometimes be confusing.

In this Python challenge, you will create a simple recycling assistant that asks the user questions about an item they want to throw away and then tells them which bin it belongs in.

This challenge is ideal for beginners who want to practise:

  • Using variables
  • Getting user input
  • Using conditional statements (if, elif, else)
  • Making decisions in a program
  • Creating user-friendly text-based applications

The Recycling Bins

Our program will based on the following recycling scheme where each household has access to 5 bins of different colours:

Bin Waste Type
Blue Bin Plastics, plastic films, glass bottles, drink cartons (Tetra Pak) and cans.
Green Bin Paper, cardboard, books and cardboard packaging.
Grey Bin Food waste, plate scrapings, mouldy food, pet food, tea bags and coffee grounds.
Brown Bin Garden waste including grass clippings, leaves, dead flowers/plants and windfall fruit.
Black Bin General rubbish such as crisp packets, used nappies and polystyrene.

Python Challenge

To solve this challenge, we will write a Python program that ask the user about the item they are about to throw away. If it’s a recognised item, our program will try to decide straight away in which bin the item should go to.

For instance, we know that newspapers, magazines, books, leaflets and postcards should all end up in the green bin. so we can use some Python code to identify if the the item being thrown away belong to this list of items:

item = input("What are you recycling today?").lower()
if item in ["newspaper","magazine","book","leaflet","postcard"]:
   print("This " + item + " goes in the green bin.")

If this item is not in this list we can check if it belongs to other lists of recognisable items for the different recycling bins. To do so we will use elif statements:

item = input("What are you recycling today?").lower()
if item in ["newspaper","magazine","book","leaflet","postcard"]:
   print("This " + item + " goes in the green bin.")
elif item in ["plastic bottle","drink carton","tetra pak","metallic can","aluminium can","glass bottle"]:
   print("This " + item + " goes in the blue bin.")
elif ...
   ...

Your Turn…

Use the online Python IDE that you will find at the bottom of this blog post to complete the code and cater for a list of items for each of the 5 recycling bins of our recycling scheme.

Unrecognised items…

Now that you have completed the code to cater for all 5 bins, you can test it and see if gives you the right advise for different items.
You will quickly realise that using this approach it is not very practical to list every single possible item and that the program may not recognise the items the user want to throw, especially if this item is either not mentioned in the given list or is described differently.

So in this case we will get our program to ask the user a series of questions to determine what type of item they are disposing of.

For example the program could ask the following questions and use the following decision tree:

Python Code

Complete the following code online:

Extension Challenge 1

Some items should not end up in our bins but instead should be brought to the nearest recycling centre. These includes batteries, chemicals, and all forms of eWaste. Could you tweak your code to inform the user to not throw these items in any of their bins but instead bring them to their local recycling centre.


Extension Challenge 2

The above challenge is based on using selection in our code (If statements).

Your extra challenge is to use iteration (using a loop) within your code. You will tweak your code to allow the user to recycle multiple items by repeating the program until they choose to quit.

unlock-access

Solution...

The solution for this challenge is available to full members!
Find out how to become a member:
➤ Members' Area